package com.audaque.jadmin.system.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;

@Table(name = "adqm_auth_token")
public class AuthToken implements Serializable {

	private static final long serialVersionUID = 1L;

	/**
	 * 主键
	 */
	@Id
	@Column(name = "AUTH_TOKEN_ID")
	private Integer authTokenId;

	/**
	 * 令牌实体
	 */
	@Column(name = "PRINCIPAL")
	private Integer principal;

	/**
	 * 凭证
	 */
	@Column(name = "CREDENTIAL")
	private String credential;

	/**
	 * 状态
	 */
	@Column(name = "STATUS")
	private Boolean status;

	/**
	 * 获取主键
	 *
	 * @return AUTH_TOKEN_ID - 主键
	 */
	public Integer getAuthTokenId() {
		return authTokenId;
	}

	/**
	 * 设置主键
	 *
	 * @param authTokenId
	 *            主键
	 */
	public void setAuthTokenId(Integer authTokenId) {
		this.authTokenId = authTokenId;
	}

	/**
	 * 获取令牌实体
	 *
	 * @return PRINCIPAL - 令牌实体
	 */
	public Integer getPrincipal() {
		return principal;
	}

	/**
	 * 设置令牌实体
	 *
	 * @param principal
	 *            令牌实体
	 */
	public void setPrincipal(Integer principal) {
		this.principal = principal;
	}

	/**
	 * 获取凭证
	 *
	 * @return CREDENTIAL - 凭证
	 */
	public String getCredential() {
		return credential;
	}

	/**
	 * 设置凭证
	 *
	 * @param credential
	 *            凭证
	 */
	public void setCredential(String credential) {
		this.credential = credential;
	}

	/**
	 * 获取状态
	 *
	 * @return STATUS - 状态
	 */
	public Boolean getStatus() {
		return status;
	}

	/**
	 * 设置状态
	 *
	 * @param status
	 *            状态
	 */
	public void setStatus(Boolean status) {
		this.status = status;
	}

	@Override
	public String toString() {
		return "AuthToken [authTokenId=" + authTokenId + ", principal=" + principal + ", credential=" + credential
				+ ", status=" + status + "]";
	}

}